//
//  Navigation.h
//  iCan - iPhone Context-Aware Navigation
//  Carnegie Mellon University - 18-842 Distributed Systems
//
//  Created by Andrew Santell on 3/26/12.
//  Copyright (c) 2012 Andrew Santell. All rights reserved.

#import <UIKit/UIKit.h> 
#import "iCanAppDelegate.h"
#import "SpinnerView.h"
#import "NavResults.h"

@interface Navigation : UIViewController <UITextFieldDelegate, UIPickerViewDelegate, UIPickerViewDataSource, NSStreamDelegate>
{
    iCanAppDelegate *appDelegate;
    NSString *result;
    NSArray *nodeList;
    NSString *destIP;
    NSString *message;
    NSInputStream *inputStream;
    NSOutputStream *outputStream;
    NavResults *navDetails;
    BOOL badCookie;
}

@property (weak, nonatomic) IBOutlet UITextField *destName;
@property (retain, nonatomic) NSString *destIP;
@property (weak, nonatomic) IBOutlet UIPickerView *pickerView;
@property (retain, nonatomic) iCanAppDelegate *appDelegate;
@property (retain, nonatomic) NSString *result;
@property (retain, nonatomic) NSArray *nodeList;
@property (retain, nonatomic) NSString *message;
@property (retain, nonatomic) SpinnerView *spinner;
@property (retain, nonatomic) NSInputStream *inputStream;
@property (retain, nonatomic) NSOutputStream *outputStream;
@property (retain, nonatomic) NavResults *navDetails;
@property BOOL badCookie;

- (IBAction)Navigate:(id)sender;
- (IBAction)clBath:(id)sender;
- (IBAction)clPrint:(id)sender;
- (void) analyzeResult;
- (void) initNetworkCommunication;
- (void) stream:(NSStream *)theStream handleEvent:(NSStreamEvent)streamEvent;



@end
